// PAR.cpp : main project file.

#include <iostream>
#include "stdafx.h"
#include "UPO_solver.h"


#define		WINDOWS		0


#if WINDOWS
using namespace System;
#else
using namespace std;
#endif


int main(int argc, char *argv[])
{	
	char *inFile;
	
	if (argc < 2) {
		cout << "Usage: " << argv[0] << " input_file" << endl;
		return 1;
	}
	else {
		inFile = argv[1];
	}
	
	InputData* input = new InputData(inFile);
	/* It's necessary to check whether is input ready */
	if (! input->inputReady())
		return 1;
	
	cout << "-----" << endl;
	cout << "Matrix on input" << endl;

	input->printMatrix();

	
	cout << "-----" << endl;

	cout << "Solution mask" << endl;



	UPO_solver* solver = new UPO_solver(input);

	solver->Solve();
	solver->WriteSolutionMask();
	
	delete input;
	delete solver;
	

#if WINDOWS
	Console::ReadLine();
#endif

	return 0;
}
